package com.gitee.wsl.struct.grammar.ast.node

/**
 * A syntax-tree consisting of [nodes][Node] and leaves represented as [lexemes][Lexeme].
 *
 * Nodes and lexemes can be combined into larger trees using [SyntaxTree.plus][com.gitee.wsl.struct.grammar.node.plus]-operator.
 *
 * ```kotlin
 * val p1 by parser { lexeme(t1) }
 * val p2 by parser { lexeme(t2) + lexeme(t3) }
 * val p3 by parser { p1() + p2() }
 * ```
 */
interface ASTNode{
    val type : NodeType
    val startOffset : Int
    val endOffset : Int
    val parent: ASTNode?
    val children : List<ASTNode>
}